#include <iostream>
#include <string>
using namespace std;
int main()
{
	int n,i;
	string b[70];
	cin>>n;
	for(i = 0;i<n*2+1;i++)
	{
		string a = string(n*4+1-i*2,i%2?'.':'$');
		if(i%2)
			a = "..$"+a+"$..";
		else if(i%2==0&&i>0)
			a = "$$$."+a+".$$$";
		else
			a = ".."+a+"..";
		for(int j = 2;j<i;j+=2)
			a = "$."+a;
		for(int j = 2;j<i;j+=2)
			a = a+".$";
		b[i] = a;
		cout<<b[i]<<endl;
	}
	string a = "..$..";
	for(int j = 0;j<n;j++)
		a = "$."+a+".$";
	cout<<a<<endl;
	string c = "$$$$$";
	for(int j = 0;j<n;j++)
		c = "$."+c+".$";
	cout<<c<<endl<<a<<endl;
	for(int j = i-1;j>0;j--)
		cout<<b[j]<<endl;
	cout<<b[0];
	return 0;
}